//保存缓存
export function setLocalStorage(name: any, data: any) {
    localStorage.setItem(name, data);
}

//获取缓存
export function getLocalStorage(name: any): string | null {
    return localStorage.getItem(name);
}

//删除缓存
export function delLocalStorage(name: any) {
    return localStorage.removeItem(name)
}

//保存缓存到Session
export function setSessionStorage(name: any, data: any) {
    sessionStorage.setItem(name, data);
}

//获取Session缓存
export function getSessionStorage(name: any): string | null {
    return sessionStorage.getItem(name);
}

//删除Session缓存
export function delSessionStorage(name: any) {
    return sessionStorage.removeItem(name)
}
